package com.hqbzl.chat.service.impl;

import com.google.common.collect.ImmutableMap;
import com.hqbzl.chat.service.UserService;

public class UserServiceImpl implements UserService {

    final ImmutableMap<String, String> build = ImmutableMap.<String, String>builder()
            .put("admin", "123")
            .put("ctx", "001")
            .put("aa", "a01")
            .put("bb", "b01")
            .put("cc", "c01")
            .put("dd", "d01")
            .put("ee", "e01")
            .build();

    @Override
    public boolean login(String userName, String password) {
        final String up = build.get(userName);
        return up != null && up.equals(password);
    }
}
